package service;

import java.sql.SQLException;
import java.util.List;

import Utils.DataSourceUtils;
import dao.CheckUsernameByAjaxDao;
import domain.User;

public class CheckUsernameByAjaxService {

	/*
	 * 判断该用户是否存在
	 */
	public static User checkuserByUsername(String username) throws SQLException {
		return new CheckUsernameByAjaxDao().cherkuserByUsername(username);
	}

	/**
	 * 模仿百度的模糊查询
	 * @param kw
	 * @return
	 * @throws SQLException 
	 */
	public List searchkw(String kw) throws SQLException {
		return new CheckUsernameByAjaxDao().searchkw(kw);
	}

}
